<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB R2019b"><title>Multi-Robot Environment</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 28.8px; min-height: 0px; white-space: pre-wrap; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 24px; font-weight: 400; text-align: left;  }
.S1 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;  }
.S2 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left;  }
.S3 { margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 14px;  }
.S4 { margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap;  }</style></head><body><div class = rtcContent><h1  class = 'S0'><span>Multi-Robot Environment</span></h1><div  class = 'S1'><span>Copyright 2018-2019 The MathWorks, Inc.</span></div><h2  class = 'S2'><span>Overview</span></h2><div  class = 'S1'><span>The Multi-Robot Environment allows you to create a 2D multi-robot mobile robotics scenario for simulation and algorithm prototyping. It includes a MATLAB and Simulink interface.</span></div><div  class = 'S1'><span>Below are some diagrams that introduce the capabilities and terminology.</span></div><div  class = 'S1'><img class = "imageNode" src = "" width = "724" height = "351" alt = "" style = "vertical-align: baseline"></img></div><div  class = 'S1'><img class = "imageNode" src = "" width = "747" height = "350" alt = "" style = "vertical-align: baseline"></img></div><div  class = 'S1'><span>The default options for the Multi-Robot Environment are</span></div><ul  class = 'S3'><li  class = 'S4'><span>Map is </span><span style=' font-weight: bold;'>EMPTY </span><span>(all free space)</span></li><li  class = 'S4'><span style=' font-weight: bold;'>ONE</span><span> point robot (zero radius)</span></li><li  class = 'S4'><span>Trajectory display is </span><span style=' font-weight: bold;'>OFF</span></li><li  class = 'S4'><span>Waypoints, lidar, object detectors, and robot detectors are </span><span style=' font-weight: bold;'>OFF</span></li><li  class = 'S4'><span>Sensor line plots and robot IDs displays are </span><span style=' font-weight: bold;'>ON </span><span>(recommend disabling for large number of robots and sensors)</span></li></ul><h2  class = 'S2'><span>MATLAB Usage</span></h2><div  class = 'S1'><span>The general syntax for the </span><span style=' font-family: monospace;'>MultiRobotEnv</span><span> object, if all options are enabled, are:</span></div><ul  class = 'S3'><li  class = 'S4'><span>Create object:          </span><span style=' font-family: monospace;'>env = MultiRobotEnv(5);</span></li><li  class = 'S4'><span>Visualize:                 </span><span style=' font-family: monospace;'>env(inds,poses,waypoints,ranges,objects);</span></li></ul><div  class = 'S1'><span>where</span></div><ul  class = 'S3'><li  class = 'S4'><span style=' font-family: monospace;'>inds</span><span> is a 1-by-</span><span style=' font-family: monospace;'>M</span><span> array representing the robot indices to display</span></li><li  class = 'S4'><span style=' font-family: monospace;'>poses</span><span> is a 3-by-</span><span style=' font-family: monospace;'>M</span><span> array whose columns represent each robot pose </span><span texencoding="[x; y; \theta]" style="vertical-align:-5px"><img src="" width="50" height="17.5" /></span><span>. This is the only mandatory input.</span></li><li  class = 'S4'><span style=' font-family: monospace;'>waypoints</span><span> is an </span><span style=' font-family: monospace;'>N</span><span>-by-2 matrix whose rows represent the </span><span texencoding="[x, y]" style="vertical-align:-5px"><img src="" width="35" height="17.5" /></span><span> location of waypoints. This input is available if the </span><span style=' font-family: monospace;'>hasWaypoints</span><span> property is </span><span style=' font-family: monospace;'>true</span><span>.</span></li><li  class = 'S4'><span style=' font-family: monospace;'>ranges</span><span> is a 1-by-</span><span style=' font-family: monospace;'>M</span><span> cell array, whose individual elements can be the empty array </span><span style=' font-family: monospace;'>[]</span><span> (for no scans) or an </span><span style=' font-family: monospace;'>N</span><span>-by-1 array of lidar ranges, in meters.</span></li><li  class = 'S4'><span style=' font-family: monospace;'>objects</span><span> is an </span><span style=' font-family: monospace;'>N</span><span>-by-3 array whose rows represent the </span><span texencoding="[x, y, label]" style="vertical-align:-5px"><img src="" width="71" height="17.5" /></span><span> of objects.</span></li></ul><div  class = 'S1'><span style=' font-weight: bold;'>NOTE: </span><span>While the syntax above is the most complete, there are 3 ways to visualize.</span></div><ul  class = 'S3'><li  class = 'S4'><span>No robots:           </span><span style=' font-family: monospace;'>env([],[],waypts,{},objs);</span></li><li  class = 'S4'><span>Single robot:        </span><span style=' font-family: monospace;'>env(1,pose1 waypts,rng1,objs);</span></li><li  class = 'S4'><span>Multiple robots:    </span><span style=' font-family: monospace;'>env([1,2,3],[pose1,pose2,pose3],waypts,{rng1,[],rng3},objs)</span></li></ul><div  class = 'S1'><span style=' font-weight: bold;'>Examples</span></div><ul  class = 'S3'><li  class = 'S4'><a href = "matlab:edit mrsMultiRobotLidar"><span>Maps and Lidar example</span></a></li><li  class = 'S4'><a href = "matlab:edit mrsMultiRobotSensors"><span>Lidar and Object Detection example</span></a></li><li  class = 'S4'><a href = "matlab:edit mrsSwarmTeams"><span>Robot Detector example</span></a></li></ul><h2  class = 'S2'><span>Simulink Usage</span></h2><div  class = 'S1'><span>Use a </span><span style=' font-weight: bold;'>Multi-Robot Environment</span><span> block and one or more </span><span style=' font-weight: bold;'>Multi-Robot Visualizer</span><span> blocks from the </span><span style=' font-weight: bold;'>Environments</span><span> section of the </span><a href = "matlab:mobileRoboticsLib"><span>block library</span></a><span>. </span></div><div  class = 'S1'><span></span></div><div  class = 'S1'><span>The </span><span style=' font-weight: bold;'>Multi-Robot Environment</span><span> block accepts two optional inputs:</span></div><ul  class = 'S3'><li  class = 'S4'><span style=' font-family: monospace;'>waypoints</span><span> is an N-by-2 matrix whose rows represent the </span><span texencoding="[x, y]" style="vertical-align:-5px"><img src="" width="35" height="17.5" /></span><span> location of waypoints. </span></li><li  class = 'S4'><span style=' font-family: monospace;'>objects</span><span> is an N-by-3 array whose rows represent the </span><span texencoding="[x, y, label]" style="vertical-align:-5px"><img src="" width="71" height="17.5" /></span><span> of objects.</span></li></ul><div  class = 'S1'><img class = "imageNode" src = "" width = "838" height = "443" alt = "" style = "vertical-align: baseline"></img></div><div  class = 'S1'><span></span></div><div  class = 'S1'><span>Each </span><span style=' font-weight: bold;'>Multi-Robot Visualizer</span><span> block accepts up to two inputs:</span></div><ul  class = 'S3'><li  class = 'S4'><span style=' font-family: monospace;'>pose</span><span> is a 3-by-1 array representing the robot pose </span><span texencoding="[x; y; \theta]" style="vertical-align:-5px"><img src="" width="50" height="17.5" /></span><span>.</span></li><li  class = 'S4'><span style=' font-family: monospace;'>ranges</span><span> is an N-by-1 array of lidar ranges, in meters. This will only appear if the </span><span style=' font-weight: bold;'>Accept lidar</span><span> option is enabled. </span></li></ul><div  class = 'S1'><img class = "imageNode" src = "" width = "849" height = "408" alt = "" style = "vertical-align: baseline"></img></div><div  class = 'S1'><span>If you are using </span><a href = "matlab:edit mrsDocLidarSensor"><span>Lidar Sensor</span></a><span> and/or </span><a href = "matlab:edit mrsDocObjectDetector"><span>Object Detector</span></a><span> blocks, ensure that the block parameters in those blocks are the same as those in the Multi-Robot Visualizer block. We recommend using MATLAB variables to represent the sensor parameters to enforce consistent values.</span></div><div  class = 'S1'><span></span></div><div  class = 'S1'><span style=' font-weight: bold;'>Examples</span></div><ul  class = 'S3'><li  class = 'S4'><a href = "matlab:mrsMultiRobotSensorModel"><span>Multi-Robot model with sensor blocks</span></a></li><li  class = 'S4'><a href = "matlab:mrsMultiRobotAvoidance"><span>Multi-Robot Obstacle Avoidance example</span></a></li></ul></div>
<br>
<!-- 
##### SOURCE BEGIN #####
%% Multi-Robot Environment
% Copyright 2018-2019 The MathWorks, Inc.
%% Overview
% The Multi-Robot Environment allows you to create a 2D multi-robot mobile robotics 
% scenario for simulation and algorithm prototyping. It includes a MATLAB and 
% Simulink interface.
% 
% Below are some diagrams that introduce the capabilities and terminology.
% 
% 
% 
% 
% 
% The default options for the Multi-Robot Environment are
%% 
% * Map is *EMPTY* (all free space)
% * *ONE* point robot (zero radius)
% * Trajectory display is *OFF*
% * Waypoints, lidar, object detectors, and robot detectors are *OFF*
% * Sensor line plots and robot IDs displays are *ON* (recommend disabling for 
% large number of robots and sensors)
%% MATLAB Usage
% The general syntax for the |MultiRobotEnv| object, if all options are enabled, 
% are:
%% 
% * Create object:          |env = MultiRobotEnv(5);|
% * Visualize:                 |env(inds,poses,waypoints,ranges,objects);|
%% 
% where
%% 
% * |inds| is a 1-by-|M| array representing the robot indices to display
% * |poses| is a 3-by-|M| array whose columns represent each robot pose $[x; 
% y; \theta]$. This is the only mandatory input.
% * |waypoints| is an |N|-by-2 matrix whose rows represent the $[x, y]$ location 
% of waypoints. This input is available if the |hasWaypoints| property is |true|.
% * |ranges| is a 1-by-|M| cell array, whose individual elements can be the 
% empty array |[]| (for no scans) or an |N|-by-1 array of lidar ranges, in meters.
% * |objects| is an |N|-by-3 array whose rows represent the $[x, y, label]$ 
% of objects.
%% 
% *NOTE:* While the syntax above is the most complete, there are 3 ways to visualize.
%% 
% * No robots:           |env([],[],waypts,{},objs);|
% * Single robot:        |env(1,pose1 waypts,rng1,objs);|
% * Multiple robots:    |env([1,2,3],[pose1,pose2,pose3],waypts,{rng1,[],rng3},objs)|
%% 
% *Examples*
%% 
% * <matlab:edit mrsMultiRobotLidar Maps and Lidar example>
% * <matlab:edit mrsMultiRobotSensors Lidar and Object Detection example>
% * <matlab:edit mrsSwarmTeams Robot Detector example>
%% Simulink Usage
% Use a *Multi-Robot Environment* block and one or more *Multi-Robot Visualizer* 
% blocks from the *Environments* section of the <matlab:mobileRoboticsLib block 
% library>. 
% 
% 
% 
% The *Multi-Robot Environment* block accepts two optional inputs:
%% 
% * |waypoints| is an N-by-2 matrix whose rows represent the $[x, y]$ location 
% of waypoints. 
% * |objects| is an N-by-3 array whose rows represent the $[x, y, label]$ of 
% objects.
%% 
% 
% 
% 
% 
% Each *Multi-Robot Visualizer* block accepts up to two inputs:
%% 
% * |pose| is a 3-by-1 array representing the robot pose $[x; y; \theta]$.
% * |ranges| is an N-by-1 array of lidar ranges, in meters. This will only appear 
% if the *Accept lidar* option is enabled. 
%% 
% 
% 
% If you are using <matlab:edit mrsDocLidarSensor Lidar Sensor> and/or <matlab:edit 
% mrsDocObjectDetector Object Detector> blocks, ensure that the block parameters 
% in those blocks are the same as those in the Multi-Robot Visualizer block. We 
% recommend using MATLAB variables to represent the sensor parameters to enforce 
% consistent values.
% 
% 
% 
% *Examples*
%% 
% * <matlab:mrsMultiRobotSensorModel Multi-Robot model with sensor blocks>
% * <matlab:mrsMultiRobotAvoidance Multi-Robot Obstacle Avoidance example>
##### SOURCE END #####
--></body></html>